﻿using System;

namespace MMD_Morph_NoteHelp
{
    public static class ThemeManager
    {
        // 记录主题状态
        public static bool IsDark { get; private set; }

        public static event Action<bool> OnThemeChanged;

        /// <summary>
        /// 主题色
        /// </summary>
        public static void SetTheme(bool isDark)
        {
            IsDark = isDark;
            // AntdUI自带的主题切换
            AntdUI.Config.IsDark = isDark;

            // 触发主题变更事件
            OnThemeChanged?.Invoke(isDark);
        }
    }
}